﻿@namespace BootstrapBlazor
@inherits BootstrapComponentBase

<div @ref="@Element" class="@Classname" style="@Style" @attributes="@AdditionalAttributes">
    @if (!string.IsNullOrWhiteSpace(Title) || ShowCloseButton)
    {
        <div class="offcanvas-header">
            <h5 class="offcanvas-title">@Title</h5>
            @if (ShowCloseButton)
            {
                <BootstrapCloseButton OnClick="@Close"></BootstrapCloseButton>
            }
        </div>
    }
    <div class="offcanvas-body">
        @ChildContent
    </div>
</div>

@if (ShowBackdrop && Show)
{
    <div class="offcanvas-backdrop fade show" @onclick="@OnClickBackdrop"></div>
}
